package com.zc.dto;

import java.util.List;

public class ResultDto<T> {
    /**
     * 判断操作是否成功
     */
    private boolean success;
    /**
     * 操作的状态码(0:成功,1:不成功,2抛异常)
     */
    private int status;
    /**
     * 提示信息
     */
    private String message;
    /**
     * 接收的实体
     */
    private T data;
    /**
     * 接收list列表
     */
    private List<?> list;
    /**
     * 导航栏
     */
    private String nav;
    /**
     * token
     */
    private String token;//后台生成token值,送往前端保存

    /**
     * 无参构造
     */
    public ResultDto() {
    }

    public void setResultData(boolean success, int status, String message, List<?> list) {
        this.success = success;
        this.status = status;
        this.message = message;
        this.list = list;
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public List<?> getList() {
        return list;
    }

    public void setList(List<?> list) {
        this.list = list;
    }

    public String getNav() {
        return nav;
    }

    public void setNav(String nav) {
        this.nav = nav;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }
}
